/**
 * 
 */
package org.t2.design.struct;

import java.util.List;

import org.gaming.ruler.util.DropUtil.IDrop;

/**
 * 
 */
public class Keyv implements IDrop {
	private int key;
	private int value;

	public int getKey() {
		return key;
	}

	public int getValue() {
		return value;
	}

	@Override
	public int getDropId() {
		return key;
	}

	@Override
	public int getDropRate() {
		return value;
	}

	public static Keyv findInList(List<Keyv> keyvs, int key) {
		for (Keyv keyv : keyvs) {
			if (keyv.getKey() == key) {
				return keyv;
			}
		}
		return null;
	}
}
